<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Forex Demo</title>
    	<link href="css/quote2.css" rel="stylesheet" type="text/css" />
		<!--link href="css/forexSmall.css" rel="stylesheet" type="text/css"/-->
		<style>
			.rtq-forex{width:450px;height:320px;border:1px #000 solid;overflow:hidden;}
			.rtq-forex .forex-hd{width:100%;height:25px;background:url(IM/bgwin2.jpg) repeat-x 0 0;}
			.rtq-forex .forex-bd{width:100%;position:relative;}			
			.rtq-forex .rtq-ddl{color:#727272;border:none;width:100px;margin-left:0;margin-top:7px;background:#fff url(../IM/bg_forex_hd.png) 0 0 repeat-x;}
			.rtq-forex .rtq-ddl .rtq-ddl-ipt{font-size:107%;padding:0;color:#727272;font-weight:bold;}			
			.rtq-forex .rtq-ddl .rtq-ddl-menu li{float:left;width:50%;}
			.forex-ticker{color:#727272;width:187px;height:157px;margin:10px 5px 0 5px;float:left;position:relative;display:inline;}
			.forex-ticker .forex-tk{width:185px;height:155px;border:1px solid #999;border-color:#b8b8b8 #999 #999 #b8b8b8;float:left;z-index:999;position:absolute;}
			.forex-ticker .tk-shadow{width:205px;height:171px;background:url(IM/bg_forex_shadow.png) 0 0 no-repeat;position:absolute;z-index:888;display:none;_background:none;_filter: progid:DXImageTransform.Microsoft.AlphaImageLoader (src='IM/bg_forex_shadow.png', sizingMethod='image');}
			.forex-ticker .forex-tk-hd{height:30px;border-bottom:#999 solid 1px;background:#fff url(IM/bg_forex_hd.png) 0 0 repeat-x;}
			.forex-ticker .forex-tk-hd .symbol{margin:8px 0 0 6px;float:left;font-size:107%;font-weight:bold;display:inline;}
			.forex-ticker .forex-tk-hd .operate{float:right;margin:9px 5px 0 0;display:inline;}
			.forex-ticker .forex-tk-hd .operate div{float:left;margin-left:5px;}
			.forex-ticker .forex-tk-hd .operate div.close{cursor:pointer;background:url(IM/ico_sprite.png) 0 -47px no-repeat;width:7px;height:7px;margin-top:3px;display:none;}		
			.forex-ticker .forex-tk-bd{width:100%;height:124px;background:#fff url(IM/bg_forex_bd.png) repeat-x 0 0;}
			.forex-ticker .forex-tk-bd .lsh{height:35px;}	
			.forex-ticker .forex-tk-bd .lsh .low{height:100%;float:left;width:70px;}	
			.forex-ticker .forex-tk-bd .lsh .spread{height:100%;float:left;width:60px;}
			.forex-ticker .forex-tk-bd .lsh .spread-font{font-weight:bold;color:#333;}	
			.forex-ticker .forex-tk-bd .lsh .high{height:100%;float:left;}
			.forex-ticker .forex-tk-bd .lsh .hd{margin-top:5px;margin-left:5px;}	
			.forex-ticker .forex-tk-bd .lsh .bd{margin-bottom:5px;margin-left:5px;}	
			.forex-ticker .forex-tk-bd .rate-bd{width:100%;height:50px;}			
			.forex-ticker .forex-tk-bd .rate-bd .rate{float:left;display:inline;margin-left:5px;height:48px;width:83px;border:1px solid #999;border-color:#b8b8b8 #999 #999 #b8b8b8;background:#fff url(IM/bg_forex_normal.gif) repeat-x 0 0;}			
			.forex-ticker .forex-tk-bd .rate-bd .rate .price{float:right;margin-top:8px;margin-right:5px;width:78px;height:28px;display:inline;}			
			.forex-ticker .forex-tk-bd .rate-bd .rate .price .price-right{float:right;color:#7d7d7d;font-size:114%;height:30px;}			
			.forex-ticker .forex-tk-bd .rate-bd .rate .price .price-center{height:100%;float:right;margin-top:0;font-size:32px;margin-right:3px;line-height:28px;color:#333;}
			.forex-ticker .forex-tk-bd .rate-bd .rate .price .price-left{float:right;margin-top:14px;}			
			div.forex-on .tk-shadow{display:block;}
			div.forex-on .forex-tk-hd{background:url(IM/bg_forex_hd_on.png) 0 0 repeat-x;font-weight:bold;color:#333;}
			.forex-ticker .forex-tk-bd .rate-bd .rise{background:#fff url(IM/bg_forex_rise.gif) repeat-x 0 0;border:1px solid #83d97c;border-color:#83d97c #4bb53d #4bb53d #83d97c;}
			.forex-ticker .forex-tk-bd .rate-bd .down{background:#fff url(IM/bg_forex_down.gif) repeat-x 0 0;border:1px solid #f99a96;border-color:#f99a96 #f72400 #f72400 #f99a96;}
			.forex-ticker .forex-tk-bd .rate-bd .price-right-rise{background:url(IM/ico_sprite.png) 0 -611px no-repeat;}
			.forex-ticker .forex-tk-bd .rate-bd .price-right-down{background:url(IM/ico_sprite.png) 0 -540px no-repeat;}
			/*******************setting panel*****************************/			
			.forex-settingpn li.loading{padding:3px;}
		</style>
	</head>
	<body>
		<div id="test"></div>
		
		<div id="test1"></div>
		<script>
			var gData={};
		</script>
		<script src="lib/migratory-jslib.js" type="text/javascript"></script>
		<script src="js/mstar.common.js" type="text/javascript"></script>
		<script type="text/javascript" src="lib/jquery.js"></script>
		<script type="text/javascript" src="js/ui/util.js"></script>
		<script type="text/javascript" src="js/forex.js"></script>
		<script>
//			var rtq_forex=new RTQ_Forex();
//			rtq_forex.init('test',null,{
//				tickers: [{
//					symbol: "EUR/USD",
//					time: "10:29:16",
//					low:"1.60607",
//					spread:"3.0",
//					high:"1.61690",
//					lowRate:['1.61','80','0'],
//					highRate:['1.61','83','4']
//				}, {
//					symbol: "EUR/JPY",
//					time: "10:31:16"
//				}, {
//					symbol: "USD/JPY",
//					time: "10:29:16"	
//				},{
//					symbol: "NZD/JPY",
//					time: "10:29:16"	
//				},{
//					symbol: "NZD/JPY",
//					time: "10:29:16"	
//				},{
//					symbol: "NZD/JPY",
//					time: "10:29:16"	
//				}]
//			},null);
				
			
			lowPrice=1.12123;
			highPrice=1.1299;
			askPrice=1.12323;
			bidPrice=1.12469;

			lowPrice1=98.10023;
			highPrice1=98.99923;
			askPrice1=98.12523;
			bidPrice1=98.25423;
			var rtq_forex=new RTQ_Forex();
			rtq_forex.init('test',null,{
				tickers: ['240:EURUSDCOMP', '240:USDJPYCOMP']
			},null);
			
//			var rtq_forex_ticker=new RTQ_Forex_Ticker({
//				container:$('#test1')
//			});
			var EUOData = {};
			var UJOData = {};
			setInterval(function(){
				
				EUOData = {AskPrice: {
					oValue: askPrice,
					dataType: "f"
				},BidPrice:{
					oValue: bidPrice,
					dataType: "f"
				}};
				
				UJOData = {
					AskPrice: {
					oValue: askPrice1,
					dataType: "f"
				},BidPrice:{
					oValue: bidPrice1,
					dataType: "f"
				}
				};
				
				gData['240:EURUSDCOMP']={	
					LowPrice:lowPrice,
					HighPrice:highPrice,
					AskPrice:askPrice+=0.00001,
					BidPrice:bidPrice+=0.00001,
					Time:'10:30:19'
				};
				
				gData['240:USDJPYCOMP']={
					LowPrice:lowPrice1,
					HighPrice:highPrice1,
					AskPrice:askPrice1+=0.001,
					BidPrice:bidPrice1+=0.001,
					Time:'10:30:19'
				};
				rtq_forex.updateData('240:EURUSDCOMP',EUOData);
				rtq_forex.updateData('240:USDJPYCOMP',UJOData);
			},4000);
			
			
//			setInterval(function(){
//				rtq_forex_ticker.flash(rtq_forex_ticker.el.find('.rate')[1],Math.floor(Math.random()*10+1),Math.floor(Math.random()*10+1));	
//			},2000);
			

		</script>
	</body>
</html>
